package _021_10_18

func solve(n int, m int, a []int) []int {
	// write code here
	m %= len(a)
	for i := 0; i < m; i++ {
		temp := a[0]
		for j := 0; j < len(a); j++ {
			temp2 := a[(j+1)%n]
			a[(j+1)%n] = temp
			temp = temp2
		}
	}
	return a
}
